// import req from "../../req";
import service from '@/utils/request-java.js'
// import tool from '@/utils/tool';

// 获取点位列表
export function SpotList(data) {
	// var a = {
	//   id:1,
	//   limit:10,
	// }
	return service({
		url: `/OaSpotController/list`,
		method: 'get',
		params: data
	});
}

export function SpotListAll(data) {
	return service({
		url: `/OaDeviceController/queryList`,
		method: 'get',
		params: data
	});
}
// 新增点位
export function AddSpot(data) {
	// console.log(data,5555555555555555)
	var a = {
	}
	return service({
		url: `/OaSpotController/add`,
		method: 'post',
		params: { ...data, ...a }
	});
}


// 编辑点位
export function EditSpot(data) {
	var a = {
		//   client_id:1,
		//   api_token:req('Spot/Edit'),
		//   token:tool.data.get("TOKEN")
	}
	return service({
		url: `/OaSpotController/edit`,
		method: 'post',
		params: { ...data, ...a }
	});
}


// 删除点位
export function DeleteSpot(data) {
	var a = {
	}
	return service({
		url: `/OaSpotController/remove`,
		method: 'delete',
		params: { ...data, ...a }
	});
}


//   获取设备列表
export function DeviceListSpot() {
	var a = {
		//   id:1,
		page: 1,
		limit: 10
	}
	return service({
		url: `/OaDeviceController/list`,
		method: 'get',
		params: { ...a }
	});
}


//   获取区域列表
export function AreaListSpot() {
	var a = {
		page: 1,
		limit: 100
	}
	return service({
		url: `/OaRegionController/list`,
		method: 'get',
		params: { ...a }
	});
}

